﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace AdministradorForm
{
    public partial class InicioForm : Form
    {
        private ConsultarPedidosForm consultarForm;
        private SeleccionarPedidoForm asignarForm;
        //private LoginForm formPadre;

        public InicioForm(/*LoginForm form*/)
        {
            InitializeComponent();
           // formPadre = form;
           // formPadre.Hide();
        }

        private void InicioForm_Load(object sender, EventArgs e)
        {
        }

        private void consultaDePedidosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (asignarForm != null)
            {
                asignarForm.Close();
                asignarForm = null;
            }

            if (consultarForm == null)
            {
                consultarForm = new ConsultarPedidosForm();
                consultarForm.MdiParent = this;
                consultarForm.Show();
            }
        }

        private void asignaciónDePedidosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (consultarForm != null)
            {
                consultarForm.Close();
                consultarForm = null;
            }

            if (asignarForm == null)
            {
                asignarForm = new SeleccionarPedidoForm();
                asignarForm.MdiParent = this;
                asignarForm.Show();
            }
        }
    }
}
